global_defs {
   router_id LVS_K8S
}

vrrp_script check_k8s {
    script "/etc/keepalived/check_http.sh"
    interval 2
}

vrrp_instance VI_1 {
    state MASTER
    interface {{ens.stdout}}
    virtual_router_id 100
    priority {{priority}}
    advert_int 1
    mcast_src_ip {{ip}}
    nopreempt
    authentication {
        auth_type nginx
        auth_pass password
    }
    virtual_ipaddress {
        {{keepalived_vip}}
    }
    track_script {
        check_k8s
    }
}